package cc.comac.mom.api;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import cc.comac.mom.bean.QualityAsrCheckForm;
import cc.comac.mom.bean.QualityReject;
import cc.comac.mom.entity.AsrCheckFormPrint;
import cc.comac.mom.util.ResultBean;

@FeignClient(name = "mom-qar-srv")
public interface QualityAsrCheckFormService {

	// 保存修改按钮触发，保存表单数据以及对表单详情数据的增删改操作
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/batchUpdateAsrCheckFormAndDetail", method = RequestMethod.POST)
	public ResultBean batchUpdateAsrCheckFormAndDetail(@RequestBody QualityAsrCheckForm qualityAsrCheckForm);

	// 提交检验按钮
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/submitCheck", method = RequestMethod.POST)
	public ResultBean submitCheck(@RequestBody QualityAsrCheckForm qualityAsrCheckForm);

	// 提交审核
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/submitReview", method = RequestMethod.POST)
	public ResultBean submitReview(@RequestBody QualityAsrCheckForm qualityAsrCheckForm);

	// 驳回按钮
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/submitReject", method = RequestMethod.POST)
	public ResultBean submitReject(@RequestBody QualityReject QualityReject);

	// 新增检验表单数据
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/batchInsertAsrCheckForm", method = RequestMethod.POST)
	public ResultBean batchInsertAsrCheckForm(@RequestBody List<QualityAsrCheckForm> list);

	// 查询检验表单及检验表单详情信息
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/selectBySomefields", method = RequestMethod.POST)
	public ResultBean selectBySomefields(@RequestBody QualityAsrCheckForm qualityAsrCheckForm);
	// 通过formId打印数据
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/printByCheckformId", method = RequestMethod.POST)
	public AsrCheckFormPrint printByCheckformId(@RequestParam(value = "formId") long formId) throws Exception;
	// 归档按钮
	@RequestMapping(value = "/p/cs/QualityAsrCheckFormService/submitToFile", method = RequestMethod.POST)
	public ResultBean submitToFile(@RequestBody QualityAsrCheckForm qualityAsrCheckForm)throws Exception;
}
